<template>
	<view class="">
		<!-- <test-douyin></test-douyin> -->
		<text>{{text}}</text>
	</view>
</template>

<script>
	import streamLoad from "@/common/streamRequest.js"
	export default {
		data() {
			return {
				text: ""
			}
		},
		onLoad() {
			this.send()
		},
		methods: {
			send() {
				const that = this
				const url = "/api/demo/sendText"
				let params = {
					result_id: 1
				}
				streamLoad(url, params, res => {
					console.log('onChunkReceived')
					this.text = res
				}, res => {
					console.log('onHeadersReceived')
				}, res => {
					console.log('success')
				}, res => {
					console.log('fail')
				}, res => {
					console.log('complete')
				})
				this.message = ""
			}
		}
	}
</script>

<style>
	
</style>